<template>
  <a-modal v-model:visible="visible"
           centered
           @cancel="cancel"
           :destroyOnClose="true"
           :footer="null"
           :title="record.name">
    <a-descriptions :column="3">
      <a-descriptions-item label="区划简称" :span="2">{{ record.shortName }}</a-descriptions-item>
      <a-descriptions-item label="区划编码" :span="1">{{ record.code }}</a-descriptions-item>
      <a-descriptions-item label="序号" :span="1">{{ record.sort }}</a-descriptions-item>
      <a-descriptions-item label="经度" :span="1">{{ record.longitude + record.longitudeUnit }}</a-descriptions-item>
      <a-descriptions-item label="纬度" :span="1">
        {{ record.latitude + record.latitudeUnit }}
      </a-descriptions-item>
    </a-descriptions>
  </a-modal>
</template>

<script>
  export default {
    name: 'SeeModel',
    data () {
      return {
        visible: false,
        record: {}
      }
    },
    methods: {
      open (record) {
        this.visible = true
        this.record = record
      },
      cancel() {
        this.visible = false
        this.$emit('close')
      }
    }
  }
</script>

<style lang="less" scoped>

</style>